#include<stdio.h>
#include<stdlib.h>

struct node
{
	int value;
	struct node *next;
	struct node *first;
};


void main()
{
	struct node head; 
	struct node *nextNode;
	struct node *currentNode;

	int no, value;
	nextNode = &head;

	printf("Enter nodes number:\n");
	scanf("%d",&no);

	printf("enter first node:");
	scanf("%d",&value);
	
	head.first = NULL;
	head.value = value;
	head.next = nextNode;

	for (int i=1; i<no; i++)
	{
		printf("enter next node:");
		scanf("%d",&value);
		currentNode = (struct node*)malloc(sizeof(struct node));
		currentNode->value = value;
		currentNode->first = &head;
		nextNode = currentNode;
		nextNode->next = nextNode;
	}

	for (int i=1; i<=no; i++)
	{
		currentNode = &head;
		printf("%d. node:%d\n",i,currentNode->value);
		currentNode = currentNode->next;
	}
	
		
		
}